import { isString } from "../isString";
import { HttpMethod } from "./HttpMethod";
import { methodHelper } from "./helper/methodHelper";

function isPut(value: string): boolean;
function isPut(value: Request): boolean;
function isPut(value: string | Request): boolean {
  if (isString(value)) {
    return methodHelper(value as string, HttpMethod.PUT);
  } else {
    return methodHelper(value as Request, HttpMethod.PUT);
  }
}

export { isPut };
